package com.zfast.yugioh.bo;

import com.zfast.forge.valid.Create;
import com.zfast.yugioh.model.Card;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.Column;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.HashMap;


/**
 * 真实卡牌
 *
 * @author zgn
 * @email
 * @date 2022-06-10 15:16:47
 */
@Data
@SuperBuilder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "CardBo", description = "真实卡牌")
public class CardBo extends Card implements Serializable  {
    @Column(name = "features_sp")
    @ApiModelProperty("独立特性")
    @NotNull(message = "独立特性不可为空", groups = {Create.class})
    private Integer featuresSp;

    @Column(name = "rate")
    @ApiModelProperty("登场率")
    @NotNull(message = "登场率不可为空", groups = {Create.class})
    private Integer rate;

    @Column(name = "shape")
    @ApiModelProperty("形态")
    @NotNull(message = "形态不可为空", groups = {Create.class})
    private Integer shape;

    @Column(name = "dialogue_sp")
    @ApiModelProperty("独立登场对话;分割")
    private String dialogueSp;

    @Column(name = "effects_features")
    @ApiModelProperty("特性效果")
    private String effectsFeatures;

    @Column(name = "effects_fetters")
    @ApiModelProperty("羁绊效果")
    private String effectsFetters;

    @Column(name = "num")
    @ApiModelProperty("登场次数")
    @NotNull(message = "登场次数不可为空", groups = {Create.class})
    private Integer num;

    @Column(name = "is_deck")
    @ApiModelProperty("卡组中0,不在;1在")
    @NotNull(message = "卡组中0,不在;1在不可为空", groups = {Create.class})
    private Boolean isDeck;

    @Transient
    @ApiModelProperty("怪兽状态/在场")
    private Integer fightStu;

    @Transient
    @ApiModelProperty("拓展记录")
    @Builder.Default
    HashMap expandMap = new HashMap();
}
